package com.myblog.service.impl;

import com.myblog.model.po.SysUser;
import com.myblog.service.SysUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Slf4j
@Component("mobileUserDetailService")
public class MobileUserDetailService extends AbstractUserUserDetailService  {

    @Autowired
    private SysUserService userService;

    @Override
    public SysUser findSysUser(String usernameOrMobile) {
        log.info("请求认证的手机号是："+usernameOrMobile);
        return userService.findByMobile(usernameOrMobile);
    }
}
